Optimal. Leaf size=31 \[ \frac{b \cos ^3(c+d x)}{3 d}-\frac{(a+b) \cos (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0224598, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.053, Rules used = {3013} \[ \frac{b \cos ^3(c+d x)}{3 d}-\frac{(a+b) \cos (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3013
Rubi steps
\begin{align*} \int \sin (c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx &=-\frac{\operatorname{Subst}\left (\int \left (a+b-b x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac{(a+b) \cos (c+d x)}{d}+\frac{b \cos ^3(c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.0194513, size = 54, normalized size = 1.74 \[ \frac{a \sin (c) \sin (d x)}{d}-\frac{a \cos (c) \cos (d x)}{d}-\frac{3 b \cos (c+d x)}{4 d}+\frac{b \cos (3 (c+d x))}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.028, size = 34, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ( -{\frac{b \left ( 2+ \left ( \sin \left ( dx+c \right ) \right ) ^{2} \right ) \cos \left ( dx+c \right ) }{3}}-\cos \left ( dx+c \right ) a \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.936997, size = 46, normalized size = 1.48 \begin{align*} \frac{{\left (\cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )} b - 3 \, a \cos \left (d x + c\right )}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.70839, size = 69, normalized size = 2.23 \begin{align*} \frac{b \cos \left (d x + c\right )^{3} - 3 \,{\left (a + b\right )} \cos \left (d x + c\right )}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.901478, size = 58, normalized size = 1.87 \begin{align*} \begin{cases} - \frac{a \cos{\left (c + d x \right )}}{d} - \frac{b \sin ^{2}{\left (c + d x \right )} \cos{\left (c + d x \right )}}{d} - \frac{2 b \cos ^{3}{\left (c + d x \right )}}{3 d} & \text{for}\: d \neq 0 \\x \left (a + b \sin ^{2}{\left (c \right )}\right ) \sin{\left (c \right )} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13028, size = 54, normalized size = 1.74 \begin{align*} \frac{1}{3} \,{\left (\frac{\cos \left (d x + c\right )^{3}}{d} - \frac{3 \, \cos \left (d x + c\right )}{d}\right )} b - \frac{a \cos \left (d x + c\right )}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]